package com.shierke.Ume.api

import com.shierke.Ume.BuildConfig
import com.shierke.Ume.bean.LoginObject
import com.shierke.Ume.bean.LoginOutObject
import com.shierke.Ume.bean.SMScallObject
import com.shierke.Ume.bean.SendCodeObject
import com.xbxm.retrofiturlmanager.RetrofitUrlManager
import io.reactivex.Observable
import okhttp3.RequestBody
import retrofit2.http.*

interface Apis {


    @Headers(RetrofitUrlManager.DOMAIN_NAME_HEADER + BuildConfig.BASE_URL)
    @POST("/api/account/sendCode")
    fun postSendCode(@Body body: RequestBody): Observable<SendCodeObject>


    @Headers(RetrofitUrlManager.DOMAIN_NAME_HEADER + BuildConfig.BASE_URL)
    @POST("/api/account/logOut")
    fun logOut(): Observable<LoginOutObject>


    @Headers(RetrofitUrlManager.DOMAIN_NAME_HEADER + BuildConfig.BASE_URL)
    @POST("/api/account/login")
    fun login(@Body body: RequestBody): Observable<LoginObject>


    @Headers(RetrofitUrlManager.DOMAIN_NAME_HEADER + BuildConfig.BASE_URL)
    @POST("/api/account/sms/callback")
    fun smsCall(@FieldMap map: Map<String, String>): Observable<SMScallObject>


}